Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalStateException reading data with struct type #43

Merged

Conversation

zhztheplayer
Copy link
Collaborator

No description provided.

@github-actions
Copy link

github-actions bot commented Nov 9, 2021

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on JIRA? https://issues.apache.org/jira/browse/ARROW

Opening JIRAs ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename pull request title in the following format?

ARROW-${JIRA_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

readLock.lock();
try {
if (schema != null) {
return schema;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dup code on 132-134 vs 127-129?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry Yuan I missed the comment before merging.

The codes applies double-checked locking to balance between performance and atomicity. Although may look tedious as we don't usually have concurrent call to this method.

For example: schema can happen to be assigned by another thread before acquiring the lock. So we have to check again inside the lock.

@zhztheplayer zhztheplayer merged commit 20244e5 into oap-project:arrow-4.0.0-oap Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants